<template>
  <view class="card-professional">
    <view class="card-header">
      <view class="name">{{ cardInfo.name }}</view>
      <view class="title-company">
        <text class="title">{{ cardInfo.title }}</text>
        <text class="separator">|</text>
        <text class="company">{{ cardInfo.company }}</text>
      </view>
    </view>
    <view class="card-body">
      <view class="contact-grid">
        <view class="contact-item">
          <text class="icon">📞</text>
          <text class="content">{{ cardInfo.phone }}</text>
        </view>
        <view class="contact-item">
          <text class="icon">✉️</text>
          <text class="content">{{ cardInfo.email }}</text>
        </view>
        <view class="contact-item full-width">
          <text class="icon">📍</text>
          <text class="content">{{ cardInfo.address }}</text>
        </view>
      </view>
    </view>
    <view class="card-footer">
      <image :src="cardInfo.qrcode" class="qrcode" mode="widthFix"></image>
      <view class="footer-text">专业 · 高效 · 诚信</view>
    </view>
  </view>
</template>

<script setup>
// import { defineProps } from 'vue'

const props = defineProps({
		cardInfo: {
			type: Object,
			default: () => ({
				name: '123-professional',
				title: '123',
				company: '�����л�ɭ��Ϣ�Ƽ����޹�˾',
				phone: '15013869352',
				email: 'asdf@test.com',
				address: 'ͬ�ִ�',
				avatar: 'https://picsum.photos/id/1005/200/200',
				qrcode: 'https://picsum.photos/id/237/100/100'
			})
		}
	})
</script>

<style scoped>
.card-professional {
  width: 620rpx;
  border-radius: 8rpx;
  box-shadow: 0 3rpx 10rpx rgba(0, 0, 0, 0.15);
  overflow: hidden;
  background-color: white;
  border-top: 8rpx solid #0a5cad;
}

.card-header {
  padding: 35rpx 30rpx 20rpx;
  border-bottom: 1px solid #f0f0f0;
}

.name {
  font-size: 42rpx;
  font-weight: bold;
  color: #1a365d;
  letter-spacing: 1rpx;
}

.title-company {
  display: flex;
  align-items: center;
  margin-top: 10rpx;
  flex-wrap: wrap;
}

.title {
  font-size: 28rpx;
  color: #3182ce;
}

.separator {
  margin: 0 10rpx;
  color: #ddd;
  font-size: 28rpx;
}

.company {
  font-size: 28rpx;
  color: #4a5568;
}

.card-body {
  padding: 25rpx 30rpx;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15rpx;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 10rpx 0;
}

.full-width {
  grid-column: 1 / -1;
}

.icon {
  font-size: 28rpx;
  color: #3182ce;
  width: 36rpx;
}

.content {
  font-size: 26rpx;
  color: #2d3748;
  margin-left: 15rpx;
  word-break: break-word;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20rpx 30rpx;
  background-color: #f7fafc;
  border-top: 1px solid #f0f0f0;
}

.qrcode {
  width: 90rpx;
  height: 90rpx;
}

.footer-text {
  font-size: 22rpx;
  color: #718096;
  letter-spacing: 1rpx;
}
</style>
